package com.hbisdt.cet.sample.domain;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Description
 * @Author Jiam
 * @Date 2025-03-22 0:27
 */
@Configuration
@PropertySource("classpath:energy-thresholds.properties")
@EnableConfigurationProperties(EnergyThresholdConfig.class)
@ConfigurationProperties(prefix = "blast-furnace")
public class EnergyThresholdConfig {
    private double energyMax;      // 最大允许能耗
    private double energyWarning; // 预警阈值
    private double co2PerTon;     // 吨钢碳排放系数

    public double getEnergyMax() {
        return energyMax;
    }

    public void setEnergyMax(double energyMax) {
        this.energyMax = energyMax;
    }

    public double getEnergyWarning() {
        return energyWarning;
    }

    public void setEnergyWarning(double energyWarning) {
        this.energyWarning = energyWarning;
    }

    public double getCo2PerTon() {
        return co2PerTon;
    }

    public void setCo2PerTon(double co2PerTon) {
        this.co2PerTon = co2PerTon;
    }

    @Override
    public String toString() {
        return "EnergyThresholdConfig{" +
                "energyMax=" + energyMax +
                ", energyWarning=" + energyWarning +
                ", co2PerTon=" + co2PerTon +
                '}';
    }
}
